﻿/**
 * 
 * Copyright 2009 Mike Jamer [email: mikejamer@gmail.com ]
 * 
 * This File is part of Moose IRC
 * 
 * MooseIRC is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * MooseIRC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with MooseIRC.  If not, see <http://www.gnu.org/licenses/>.
 * 
 */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace moose.irc.standard
{
    [CLSCompliant(true)]
    [Response(
        name = "Basic Server Message Response",
        description = "Echos response as a status message",
        author = "Mike MacKenzie-Jamer <email: mikejamer@gmail.com>",
        version = "0.1")]
    [Trigger(TriggerText = "004")]
    [Trigger(TriggerText = "251")]
    [Trigger(TriggerText = "252")]
    [Trigger(TriggerText = "253")]
    [Trigger(TriggerText = "254")]
    [Trigger(TriggerText = "255")]
    [Trigger(TriggerText = "265")]
    [Trigger(TriggerText = "266")]
    [Trigger(TriggerText = "250")]
    [Trigger(TriggerText = "375")] //MOTD Start
    [Trigger(TriggerText = "372")] //MOTD --May break this out into something else, but for now, its fine...
    [Trigger(TriggerText = "376")] //END MOTD
    public sealed class BasicServerMessageResponse : IrcAction
    {
        protected override IrcState valid_states()
        {
            return IrcState.Connected | IrcState.Registered;
        }

        protected override void action(IrcClient client, IrcMessage input)
        {
            client.echo(MessageUtility.print(input));
            return;
        }
    }
}
